<template>
  <div class="slide">
    <mt-swipe :auto="0" :showIndicators=false :continuous=false>
      <mt-swipe-item><img class="img" src="../assets/loading_1.png" /></mt-swipe-item>
      <mt-swipe-item><img class="img" src="../assets/loading_2.png" /></mt-swipe-item>
      <mt-swipe-item>
        <router-link :to="{path:'/sign'}" style='color: #000;'>
          <div class="start">立即进入</div>
        </router-link>
        <img class="img" src="../assets/loading_3.png" /></mt-swipe-item>
    </mt-swipe>
  </div>
</template>

<script>
export default {
  name: 'Slide',
  data () {
    return {}
  },
  beforeRouteEnter (to, from, next) {
    if (window.localStorage.getItem('comming')) {
      next('/sign')
    } else {
      next()
      window.localStorage.setItem('comming', true)
    }
  }
}
</script>

<style lang="scss" scoped>
.slide {
  height: 100%;
  .img {
    width: 100%;
    height: 100%;
    position: relative;
  }
  .start {
    position: absolute;
    bottom: 12%;
    left: 50%;
    z-index: 9999;
    width: 6.4rem;
    height: 2.5rem;
    margin-left: -3.2rem;
    border-radius: 5px;
    border: none;
    background-color: rgba(00, 00, 00, 0.3);
    color: #fff;
    text-align: center;
    line-height: 2.5rem;
  }
}
</style>
